package com.yanmaohu.yulia.statement;

import com.yanmaohu.yulia.bean.*;

/**
 * @author Bright Lee
 */
public final class SchemaProcedure implements SchemaRoutine, Statement {

    private int beginIndex;
    private int endIndex;
    private SchemaQualifiedName schemaQualifiedRoutineName;
    private SqlParameterDeclarationList sqlParameterDeclarationList;
    private RoutineCharacteristics routineCharacteristics;
    private RoutineBody routineBody;

    public SchemaProcedure(int beginIndex,
                           SchemaQualifiedName schemaQualifiedRoutineName,
                           SqlParameterDeclarationList sqlParameterDeclarationList,
                           RoutineCharacteristics routineCharacteristics,
                           RoutineBody routineBody) {
        this.beginIndex = beginIndex;
        this.endIndex = routineBody.getEndIndex();
        this.schemaQualifiedRoutineName = schemaQualifiedRoutineName;
        this.sqlParameterDeclarationList = sqlParameterDeclarationList;
        this.routineCharacteristics = routineCharacteristics;
        this.routineBody = routineBody;
    }

    @Override
    public int getBeginIndex() {
        return beginIndex;
    }

    @Override
    public int getEndIndex() {
        return endIndex;
    }

    public SchemaQualifiedName getSchemaQualifiedRoutineName() {
        return schemaQualifiedRoutineName;
    }

    public SqlParameterDeclarationList getSqlParameterDeclarationList() {
        return sqlParameterDeclarationList;
    }

    public RoutineCharacteristics getRoutineCharacteristics() {
        return routineCharacteristics;
    }

    public RoutineBody getRoutineBody() {
        return routineBody;
    }

}
